<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="__JS__jQuery v2.1.4.js"></script>
</head>
<body>
<form method="post" action="">
    <label for="">手机号</label>
    <input type="text" class="phone" >
    <label for="">邮箱</label>
    <input type="email" class="email">
    <input type="submit" class="btn">
</form>
<script>
    $('.btn').click(function () {
        var str = $('.phone').val();
        if(str == ''){
            alert('手机号码不能为空')
            return false;
        }
        var ph = /^1[34578]\d{9}$/;
        var result = ph.test(str);
        if(result == true){
            alert('正确')
        }else{
            alert('错误');
            return false;
        }
        var ema = $('.email').val();
        if(ema == ''){
            alert('邮箱不能为空!!!!');
            return false;
        }
        var em = /^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;
        var emres = em.test(ema);
        if(emres==true){
            alert(1);
        }else {
            alert(0);
            return false;
        }
    })
</script>
</body>
</html>